package gupao.design.factory.simplefactory;

import gupao.design.factory.ICourse;
import gupao.design.factory.JavaCourse;
import gupao.design.factory.PythonCourse;

/**
 * @author: liuchenhui
 * @create: 2019-04-14 14:07
 **/
public class SimpleFactoryTest {
    public static void main(String[] args) {
//        ICourse course = new JavaCourse();
//        course.record();

        CourseFactory courseFactory = new CourseFactory();
        ICourse course = courseFactory.create(JavaCourse.class);
        course.record();
        course = courseFactory.create(PythonCourse.class);
        course.record();
    }
}
